package com.miage.utils;

public class Constante {
	
	// Parse
	public static final String PARSE_APPLICATION_ID = "IBVOu95JsOr6AvFdUKrCMFcggM4Lkj3IUNavAy5d";
	public static final String PARSE_CLIENT_KEY = "jXH3Lb3P8TvOXZkLawBV0vd6zyutaYc0ymHoCekp";
	
	// -----------------------------------------------------------------------------------------------------
	
	// PARTICIPANT
	public static final String PARTICIPANT_TABLE = " PARTICIPANT";
	public static final String PARTICIPANT_COLUMN_ID = "_id";
	public static final String PARTICIPANT_COLUMN_PSEUDO = "pseudo";
	public static final String PARTICIPANT_COLUMN_MONTANT_CPTE = "montantCpte";
	public static final String PARTICIPANT_FOREIGNKEY_ID_EVENEMENT = "idEvenement";
	public static final String PARTICIPANT_FOREIGNKEY_ID_UTILISATEUR = "idUtilisateur";
	
	public static final String PARTICIPANT_TABLE_CREATE = 
			"CREATE TABLE " + PARTICIPANT_TABLE + "("
			+ PARTICIPANT_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 
			+ PARTICIPANT_COLUMN_PSEUDO + " TEXT, " 
			+ PARTICIPANT_COLUMN_MONTANT_CPTE + " FLOAT DEFAULT 0, "
			+ PARTICIPANT_FOREIGNKEY_ID_EVENEMENT + " INTEGER, "
			+ PARTICIPANT_FOREIGNKEY_ID_UTILISATEUR + " TEXT);";
		
	public static final String PARTICIPANT_TABLE_DROP = "DROP TABLE IF EXISTS " + PARTICIPANT_TABLE + ";";
	
	
	
	// -----------------------------------------------------------------------------------------------------
	
	// UTILISATEUR
//	public static final String UTILISATEUR_TABLE = "UTILISATEUR";
//	public static final String UTILISATEUR_COLUMN_ID = "_id";
//	public static final String UTILISATEUR_COLUMN_PSEUDO = "pseudo";
//	public static final String UTILISATEUR_COLUMN_MOT_DE_PASSE = "motDePasse";
//	
//	public static final String UTILISATEUR_TABLE_CREATE =
//			"CREATE TABLE " + UTILISATEUR_TABLE + "("
//			+ UTILISATEUR_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 
//			+ UTILISATEUR_COLUMN_PSEUDO + " TEXT, " 
//			+ UTILISATEUR_COLUMN_MOT_DE_PASSE + " TEXT);";
//	
//	public static final String UTILISATEUR_TABLE_DROP = "DROP TABLE IF EXISTS " + UTILISATEUR_TABLE + ";";
//	
//	public static final String UTILISATEUR_INITIALIZE =
//			"INSERT INTO " + UTILISATEUR_TABLE + " ("
//			+ UTILISATEUR_COLUMN_PSEUDO + ", "
//			+ UTILISATEUR_COLUMN_MOT_DE_PASSE
//			+ ") VALUES ('admin', 'admin');";
//		
	// -----------------------------------------------------------------------------------------------------
	
	// EVENEMENT
	public static final String EVENEMENT_TABLE = "EVENEMENT";
	public static final String EVENEMENT_COLUMN_ID = "_id";
	public static final String EVENEMENT_COLUMN_NOM = "nom";
	public static final String EVENEMENT_COLUMN_DATE_DEBUT = "dateDebut";
	public static final String EVENEMENT_COLUMN_DATE_FIN = "dateFin";
	
	public static final String EVENEMENT_TABLE_CREATE =
			"CREATE TABLE " + EVENEMENT_TABLE + "("
			+ EVENEMENT_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 
			+ EVENEMENT_COLUMN_NOM + " TEXT, " 
			+ EVENEMENT_COLUMN_DATE_DEBUT + " TEXT, "
			+ EVENEMENT_COLUMN_DATE_FIN + " TEXT);";
	
	public static final String EVENEMENT_TABLE_DROP = "DROP TABLE IF EXISTS " + EVENEMENT_TABLE + ";";
	
	// -----------------------------------------------------------------------------------------------------
	
	// DETTE
	public static final String DETTE_TABLE = "DETTE";
	public static final String DETTE_COLUMN_ID = "_id";
	public static final String DETTE_COLUMN_MONTANT = "montant";
	public static final String DETTE_FOREIGNKEY_ID_PARTICIPANT_PAYEUR = "idParticipantPayeur";
	public static final String DETTE_FOREIGNKEY_ID_PARTICIPANT_PAYE = "idParticipantPaye";
	public static final String DETTE_FOREIGNKEY_ID_DEPENSE = "idDepense";

	
	public static final String DETTE_TABLE_CREATE =
			"CREATE TABLE " + DETTE_TABLE + "("
			+ DETTE_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 
			+ DETTE_COLUMN_MONTANT + " REAL, " 
			+ DETTE_FOREIGNKEY_ID_PARTICIPANT_PAYEUR + " INTEGER, "
			+ DETTE_FOREIGNKEY_ID_PARTICIPANT_PAYE + " INTEGER, "
			+ DETTE_FOREIGNKEY_ID_DEPENSE + " INTEGER);";
	
	public static final String DETTE_TABLE_DROP = "DROP TABLE IF EXISTS " + DETTE_TABLE + ";";
	
	
	// DEPENSE
	public static final String DEPENSE_TABLE = "DEPENSE";
	public static final String DEPENSE_COLUMN_ID = "_id";
	public static final String DEPENSE_COLUMN_NOM = "nom";
	public static final String DEPENSE_COLUMN_DESCRIPTION = "description";
	public static final String DEPENSE_COLUMN_MONTANT = "montant";
	public static final String DEPENSE_COLUMN_DATE = "date";
	public static final String DEPENSE_COLUMN_TYPE_DEBIT = "typeDebit";
	public static final String DEPENSE_COLUMN_TYPE_PAIEMENT = "typePaiement";
	public static final String DEPENSE_FOREIGNKEY_ID_PARTICIPANT = "idParticipant";
	public static final String DEPENSE_FOREIGNKEY_ID_EVENEMENT = "idEvenement";
	
	public static final String DEPENSE_TABLE_CREATE = 
			"CREATE TABLE " + DEPENSE_TABLE + " ("
			+ DEPENSE_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ DEPENSE_COLUMN_NOM + " TEXT , "
			+ DEPENSE_COLUMN_DESCRIPTION + " TEXT, "
			+ DEPENSE_COLUMN_MONTANT + " REAL, "
			+ DEPENSE_COLUMN_DATE + " TEXT, "
			+ DEPENSE_COLUMN_TYPE_DEBIT + " TEXT, "
			+ DEPENSE_COLUMN_TYPE_PAIEMENT + " TEXT, "
			+ DEPENSE_FOREIGNKEY_ID_PARTICIPANT + " INTEGER, "
			+ DEPENSE_FOREIGNKEY_ID_EVENEMENT + " INTEGER"
			+ ");";
	
	public static final String DEPENSE_TABLE_DROP = "DROP TABLE IF EXISTS " + DEPENSE_TABLE + ";";
}
